Method and Apparatus for Determining in Picture Signal Encoding the Bit Allocation for Groups of Pixel Blocks in a Picture

ABSTRACT

Optimised bit allocation is important in video compression to increase the coding efficiency, i.e. to make optimum use of the available data rate. In view of the human visual system, a human usually pays more attention to some part of a picture rather than to other parts of that picture. Therefore the bit allocation should be optimised for different-attention picture areas (GOB i ). The inventive distortion-driven bit allocation scheme allocates the coding/decoding error distortion to picture areas consistently with the human visual system, and satisfies the constraint of bit rate as well. The invention uses a distortion/bitrate/rhoquantisation parameter histogram analysis. Based on corresponding tables (D GOBi [QP n ], R GOBi [QP n ] and ρ GOBi [QP n ]), the relationships between quantisation parameter, rate, distortion and percentage of non-zero coefficients for the different-attention areas are determined (PREALUTI, DISALL, RALL). Thereafter a rho-domain bit rate control is used (RDBALL) for calculating the bit allocation inside each group of macroblocks.

The invention relates to a method and to an apparatus for determining in picture signal encoding the bit allocation for groups of pixel blocks, whereby these groups of pixel blocks belong to different attention importance levels of corresponding arbitrary-shaped areas of pixel blocks in a picture.

BACKGROUND

Optimised bit allocation is an important issue in video compression to increase the coding efficiency, i.e. to make optimum use of the available data rate. Achieving the best perceptual quality with respect to the limited bit rate is the target of optimised bit allocation. In view of the human visual system, a human usually pays more attention to some part of a picture rather than to other parts of that picture. The ‘attention area’, which is the perceptual sensitive area in a picture, tends to catch more human attention, as is described e.g. in L. Itti, Ch. Koch, E. Niebur, “A Model of Saliency-Based Visual Attention for Rapid Scene Analysis”, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 20, No. 11, Nov. 1998. Therefore optimum bit allocation based on different perceptual importance of different attention picture areas is a research topic in video compression technology.

E.g. the macroblock-layer bit rate control in MPEG2 and MPEG4 selects the values of the quantisation (following transformation) step sizes Q_(step) for all the macroblocks in a current frame so that the sum of the bits used for these macroblocks is close to the frame target bit rate B. MPEG2 and MPEG4 support 31 different values of Q_(step). In MPEG4 AVC a total of 52 Q_(step) values are supported by the standard and these are indexed by a quantisation parameter value QP. Ch. W. Tang, Ch. H. Chen, Y. H. Yu, Ch. J. Tsai, “A novel visual distortion sensitivity analysis for video encoder bit allocation”, ICIP 2004, Volume 5, 24-27 Oct. 2004, pp. 3225-3228, propose a description for the visual distortion sensitivity, namely the capability for human vision to detect distortion in moving scenes, while the bit allocation scheme is very simple, by using the formula:

QP_(N)=QP+(1−VDS_(i,j)/255)*Δq  (1)

where QP is the initial quantisation parameter assigned by the rate control, Δq is a parameter for limiting the modification of QP, VDS_(i,j) is the visual distortion sensitivity value of the (i,j)th macroblock (denoted MB) in a picture, and QP_(N) is the refined quantisation parameter. This bit allocation scheme is rough and simple and does not consider an accurate bit rate control and distortion distribution control.

In S. Sengupta, S. K. Gupta, J. M. Hannah, “Perceptually motivated bit-allocation for H.264 encoded video sequences”, ICIP 2003, a picture is divided into foreground and background area, and then a target distortion D_(tar) is pre-decided for foreground quality without guarantee for the background quality. The quality of the background varies as a function of the distance from the foreground. The rate of degradation is controlled by a visual sensivity factor

S=e ^(−d/a)  (2)

where a is a constant controlling the rate of fall of the background degradation and d is the distance of a background pixel from the nearest foreground pixel. This scheme tries to give a distortion distribution consistent with the human visual system, while its performance suffers from the accuracy of the used model, and it does not explain how to get D_(tar) and to keep the quality degradation according to given equations under a pre-determined bit budget.

In order to solve the problem of optimised bit allocation with bit budget constraint, typical bit allocation algorithms are based on a Rate-Distortion optimisation with Lagrangian multiplier processing which can be described as a constraint optimisation problem to minimise the total distortion D with the constraint rate R less than R_(T), using an expression like:

$\begin{matrix} {{\min \; J\text{:}J} = {{D + {\lambda \times R}} = {{\sum\limits_{i = 1}^{N}D_{i}} + {\lambda \times {\sum\limits_{i = 1}^{N}R_{i}}}}}} & (3) \end{matrix}$

where D_(i) and R_(i) are the distortion and the bit rate of each unit i (MB or attention area).

Assuming that the rate and distortion of each MB are only dependent on the choice of the encoding parameters as described above, the optimisation of equation (3) can be simplified to minimise the cost of each MB separately:

minJ _(i) :J _(i) =D _(i) +λ×R _(i)  (4)

It has been proposed to use an optimised bit allocation scheme based on modifying the Lagrange multiplier in the coding mode decision of each MB according to formula:

λ′=α×λ  (5)

where α is a scaling factor for modifying the Lagrange multiplier according to different levels of perceptual importance.

It has also been proposed to add a different weighting factor W_(i) to the distortion of different attention areas to perform optimised bit allocation:

$\begin{matrix} {{\min \; J\text{:}J} = {{\sum\limits_{i = 1}^{N}{w_{i} \times D_{i}}} + {\lambda \times {\sum\limits_{i = 1}^{N}R_{i}}}}} & (6) \end{matrix}$

whereby the rate and distortion model can be deduced based on a ρ-domain bit rate control model like this one:

R _(i) =Aρ _(i) +B

D _(i)=384σ_(i) ² e ^(−θσ) ^(i) ^(/384)  (7)

Equations (7) can be put into equation (6) to get the optimised solution for bit allocation.

It is also known to use a Rate-Distortion model based on Gaussian distribution to get an optimum result for bit allocation, as shown in formula (8):

D _(i)=σ_(i) ² ×e ^(−γR) ^(i)   (8)

INVENTION

However, known methods can not significantly influence the distortion distribution so as to make it more consistent with the properties of the human visual system. For example, using a different weighting factor W_(i) for different attention areas according to their different importance to human eyes can not really influence the distortion distribution accordingly. In addition, known methods are not accurate enough (especially on MB level) to get a better performance. Further, known methods have problems in keeping a good trade-off between distortion distribution and bit allocation constraint.

A problem to be solved by the invention is to provide an improved distortion-driven bit allocation for bit rate control in video signal encoding. This problem is solved by the method disclosed in claim 1. An apparatus that utilises this method is disclosed in claim 2.

The inventive distortion-driven bit allocation scheme allocates the coding/decoding error distortion to picture areas consistently with the human visual system, and satisfies the constraint of bit rate as well. “Distortion-driven” means a bit allocation achieving an optimised coding/decoding error distortion distribution under bit rate constraint, whereby the primary target is not to minimise the total distortion. The invention makes the distortion distribution inside a picture more consistent with the human visual properties, and thus achieves a much better subjective quality with limited bit rate, or allows decreasing the bit rate while keeping a consistent subjective quality.

The invention uses a distortion/bitrate/Rho-quantisation parameter histogram analysis. Based on such histogram analysis, the relationships between quantisation parameter, rate, distortion and percentage of non-zero coefficients are determined. The distortion allocation scheme is based on the assumption of Gaussian distribution of the residual signals (following mode decision and intra or inter prediction, before transform and quantisation). Then a rho-domain (σ-domain) bit rate control is used for calculating the bit allocation inside each group of macroblocks (GOB).

In principle, the inventive method is suited for determining in picture signal encoding, which includes transform and quantisation of transform coefficient blocks, the bit allocation for groups of pixel blocks in a picture, whereby said picture is divided into a regular grid of pixel blocks and said groups of pixel blocks belong to different attention importance levels of corresponding arbitrary-shaped areas of pixel blocks in said picture, and wherein the encoding/decoding distortion of each group of pixel blocks is to be controlled such that it is basically proportional to the attention importance level for that group of pixel blocks, and wherein a bit budget is given for the encoded picture and said quantisation is controlled by a quantisation parameter, said method including the steps:

-   -   for the current picture, with respect to candidates of said         quantisation parameter, establishing for each group of pixel         blocks tables or lists or functions for the estimated distortion         and for the bit rate and for the number of zero-amplitude         coefficients following said quantisation;     -   calculating for each one of said groups of pixel blocks the         corresponding distortion distribution, using said tables or         lists or functions for the estimated distortion and for the bit         rate and, using also the output from the following step,         modifying said distortion distribution in order to reach said         bit budget;     -   based on said tables or lists or functions for the estimated         distortion and for the bit rate, and based on said calculated         distortion distribution, calculating an estimated bit rate for         each one of said groups of pixel blocks;     -   performing a rho-domain bit allocation for each one of said         groups of pixel blocks using said estimated bit rate and said         table or list or function for the number of zero-amplitude         coefficients, to determine the corresponding one of said         quantisation parameters for quantising and encoding the pixel         blocks.

In principle the inventive apparatus is suited for determining in picture signal encoding, which includes transform and quantisation of transform coefficient blocks, the bit allocation for groups of pixel blocks in a picture, whereby said picture is divided into a regular grid of pixel blocks and said groups of pixel blocks belong to different attention importance levels of corresponding arbitrary-shaped areas of pixel blocks in said picture, and wherein the encoding/decoding distortion of each group of pixel blocks is to be controlled such that it is basically proportional to the attention importance level for that group of pixel blocks, and wherein a bit budget is given for the encoded picture and said quantisation is controlled by a quantisation parameter, said apparatus including:

-   -   means being adapted for establishing, for the current picture,         with respect to candidates of said quantisation parameter, for         each group of pixel blocks tables or lists or functions for the         estimated distortion and for the bit rate and for the number of         zero-amplitude coefficients following said quantisation;     -   means being adapted for calculating for each one of said groups         of pixel blocks the corresponding distortion distribution, using         said tables or lists or functions for the estimated distortion         and for the bit rate and, using also the output from the         following step, modifying said distortion distribution in order         to reach said bit budget;     -   means being adapted for calculating, based on said tables or         lists or functions for the estimated distortion and for the bit         rate, and based on said calculated distortion distribution, an         estimated bit rate for each one of said groups of pixel blocks;     -   means being adapted for performing a rho-domain bit allocation         for each one of said groups of pixel blocks using said estimated         bit rate and said table or list or function for the number of         zero-amplitude coefficients, to determine the corresponding one         of said quantisation parameters for quantising and encoding the         pixel blocks.

Advantageous additional embodiments of the invention are disclosed in the respective dependent claims.

DRAWINGS

Exemplary embodiments of the invention are described with reference to the accompanying drawings, which show in:

FIG. 1 example attention mask;

FIG. 2 flowchart for the inventive content based distortion-driven bit allocation (CDBA) scheme.

EXEMPLARY EMBODIMENTS

As mentioned above, humans pay more attention to some parts of a picture than to other parts of that picture. The part receiving more human attention are called ‘attention area’. In the above-mentioned article from L. Itti et al. and in EP application 05300974.2, a set of grey-level feature maps is extracted from the visual input of a given image. These features include intensity, colour, orientation, and so on. Then in each feature map, the most salient areas are picked out. Finally all feature maps are integrated, in a purely bottom-up manner, into a master ‘saliency map’ which is regarded as the attention information of a picture. Therefrom an attention mask can be obtained for each picture, which mask describes the different attention importance levels of corresponding areas of that picture.

FIG. 1 shows an example attention mask that divides macroblocks in the picture into a set of four levels M_(i) of attention importance, i=1 . . . 4. To the white blocks the level M₄ is assigned, to the slightly hatched blocks the level M₃ is assigned, to the strongly hatched blocks the level M₂ is assigned, and to the diagonally hatched blocks the level M₁ is assigned. A larger M_(i) value means that a larger distortion can be tolerated because it is a less visually important area. E.g. in case N=2, M₁=1 and M₂=2 it means that the background distortion level (level 2) can be two times the foreground distortion level (level 1).

How to calculate the level sets and the corresponding visual importance values M_(i) is not described in detail here. The bit allocation scheme can be based on the assumption that the attention mask has been obtained with M_(i), (i=1 . . . N), where N is the number of attention levels.

Basically, the distortion-driven bit allocation problem can be described as follows:

According to the attention mask, the picture can be divided into N GOBs (groups of macroblocks) according to different attention or mask values M_(i), each GOB_(i) contains K_(i) macroblocks (denoted MB), and

${{\sum\limits_{i = 1}^{N}K_{i}} = N_{MB}},$

where N_(MB) is the total number of MBs in one picture. With a frame bit budget R_(f) which can be derived from any frame-level bit rate control, the inventive processing allocates the distortion D_(i) for each MB in GOB_(i) according to the corresponding attention mask value M_(i), by these two constraints:

$\begin{matrix} {{\overset{\_}{D}}_{i} = {D_{u} \times M_{i}}} & (9) \\ {{\sum\limits_{i = 1}^{N}{\overset{\_}{R}}_{i}} \approx R_{f}} & (10) \end{matrix}$

where R_(i) is the bit rate allocated to each GOB_(i) and D_(u) is a constant distortion unit for each MB. Equation (9) means that the distortion of each GOB_(i) is (basically) proportional to its attention mask value and then the distortion distribution will be consistent with the human perception. Equation (10) means that the total frame or picture bit budget R_(f) should be met in this case. Therefore the invention shall provide a distortion-driven bit allocation scheme based on visual attention analysis, and the resulting distortion and bit rate should meet the requirements of equations (9) and (10).

In FIG. 2 a flowchart for the inventive content based distortion-driven bit allocation scheme (CDBA) is depicted. Since many research work has been published about constructing an attention area model, e.g. the above-mentioned article from L. Itti et al. and EP application 05300974.2, it is assumed that the attention mask has been obtained already, that the picture has been divided into N GOBs, and that the frame bit budget R_(f) has been derived from any frame-level or field-level rate control algorithm. Then the following steps are carried out to calculate the distortion-driven bit allocation:

Step 1) Pre-Analysis and Look-Up Table Initialisation PREALUTI

For the currently processed picture, for each GOB_(i), (i=1 . . . N), based on the histogram analysis algorithms, three look-up tables or lists or functions D_(GOB) _(i) [QP_(n)], R_(GOB) _(i) [QP_(n)] and ρ_(GOB) _(i) [QP_(n)] are determined for each GOB, wherein QP_(n) is the candidate quantisation parameter, D_(GOB) _(i) [QP_(n)] is the estimated distortion (in units of average distortion per MB), R_(GOB) _(i) [QP_(n)] is the bit rate of each GOB_(i) under quantisation parameter QP_(n), and ρ_(GOB) _(i) [QP_(n)] is the number of zero-amplitude coefficients of GOB_(i), following quantisation using quantisation parameter QP_(n).

Step 2) Distortion Allocation DISALL Step 2.1) Estimate Distortion Distribution Under Constant Bit Rate ESTDDISTR

Assume each GOB_(i) contains K_(i) MBs, and

${{\sum\limits_{i = 1}^{N}K_{i}} = N_{MB}},$

where N_(MB) is the total number of MBs in one picture, then the allocated bit rate for each GOB_(i) in case of Constant Bit Rate (CBR) output (i.e. without regarding different distortion levels in the different attention level areas) should be

$R_{i} = {R_{f} \times {\frac{K_{i}}{N_{MB}}.}}$

Therefore the corresponding initial distortion value D_(i) for each GOB_(i) can be derived by looking up the tables D_(GOB) _(i) [QP_(n)] and R_(GOB) _(i) [QP_(n)] This distortion value is used in the following as a distortion multiplication value with a constraint bit budget.

Step 2.2) Calculate Distortion Unit CALLDU

Based on the assumption that the residual signal amplitudes (i.e. the transformed prediction error signals) have a Gaussian distribution and a corresponding rate distortion model (cf. W. Lai, X. D. Gu, R. H. Wang, W. Y. Ma, H. J. Zhang, “A content-based bit allocation model for video streaming”, ICME '04, 2004 IEEE International Conference on Multimedia and Expo, Volume 2, 27-30 Jun. 2004, pp. 1315-1318), the following formula can be used to get the distortion unit of D_(u):

$\begin{matrix} {D_{u} = ^{{({{\sum\limits_{i = 1}^{N}{l\; n{\overset{\overset{\_}{\_}}{D}}_{i}}} - {\sum\limits_{i = 1}^{N}{l\; {nM}_{i}}} - {\sum\limits_{i = 1}^{N}{l\; {nK}_{i}}}})}/N}} & (11) \end{matrix}$

Step 2.3) Get the Refined Distortion Distribution GREFDDIRTR

Get the allocated distortion D_(i) for each MB in GOB_(i) by using formula (9): D_(i) =D_(u)×M_(i). Due to inaccuracy of the Gaussian distribution assumption, a minor modification can be carried out based on a feedback from Step 3) in order to reach the given bit budget.

Since distortion or bit rate under each quantisation parameters should be discrete and one can not achieve the exact distortion value under formula D_(i) =D_(u)×M_(i), the look-up table produced in the pre-analysis Step 1) can be used and the value D_(i) is adapted so as to be the one in that distortion look-up table which is most close to the estimated value of D_(i) =D_(u)×M_(i).

Concerning the feedback from Step 3), where the estimated bit rate R_(i) in Step 3) is larger or smaller than the bit budget, some modification can be performed in Step 2) by checking adjacent values (close to D_(i) =D_(u)×M_(i)) in the look-up table to reach the given bit budget.

Step 3) Bit Rate Allocation RALL

Based on table of D_(GOB) _(i) [QP_(n)] and R_(GOB) _(i) [QP_(n)] and D_(i) from Step 2), the estimated rate R_(i) can be directly obtained for each GOB_(i), i=1 . . . N. And the estimated result is fed back to Step 2.3) to do some minor emendation on the allocated rate in order to reach the bit budget.

Step 4) Rho-Domain Bit Allocation Inside Each GOB_(i) RDBALL Step 4.1) Quantisation Parameter Determination QPDET

Similar to the ρ domain rate control model in Z. He and S. K. Mitra, “A linear source model and a unified rate control algorithm for DCT video coding”, IEEE Transactions on Circuits and Systems for Video Technology, Vol. 12, No. 11, November 2002, pp. 970-982, the number of zeros to be produced by quantising the remaining MBs inside GOB_(i) should be:

$\begin{matrix} {\rho = {{384*\left( {K_{i} - N_{i}^{c}} \right)} - \frac{{\overset{\_}{R}}_{i} - R_{i}^{c}}{\theta}}} & (12) \end{matrix}$

where N_(i) ^(c) is the number of the coded MBs of GOB_(i) in the current picture, R_(i) ^(c) is the number of bits used to encode these N_(i) ^(c) MBs, and K_(i) is the total number of the MBs of GOB_(i). Looking-up table ρ_(GOB) _(i) [QP_(n)], the quantisation parameter QP is determined. Then the current MB is quantised using that QP value and is encoded.

Step 4.2) Update Parameters UPDPAR

Updating of the parameters θ and ρ_(GOB) _(i) [QP_(n)] according to the already encoded MBs:

$\begin{matrix} {\theta = \frac{R_{i}^{c}}{{384*N_{i}^{c}} - \rho_{i}^{c}}} & (13) \end{matrix}$

where ρ_(i) ^(c) is the number of quantised zero coefficients in these coded N_(i) ^(c) MBs. Thereafter the next macroblock is encoded.

In the following, additional explanations for steps 1) to 4) are given:

Step 1) Pre-Analysis and Look-Up Table Initialisation

Based on the algorithm proposed by S. H. Hong, S. D. Kim, “Histogram-based rate-distortion estimation for MPEG-2 video”, IEE Proceedings Vision, Image Signal Processing, Vol. 146, No. 4, Aug. 1999, pp. 198-205, a histogram based rate-distortion estimation for the ISO/IEC 14496-10 AVC/H.264 standard is carried out. The basic assumptions are: the distortion in terms of mean squared error (MSE) is proportional to the square of the applied quantisation parameter, and a uniform quantisation is normally used in existing video coding standards. Then an iterative algorithm can be used to estimate the distortion of different quantisation parameters according to D(QP_(n))=D(QP_(n−1))+ΔD(QP_(n−1), QP_(n)), where ΔD(QP_(n−1), QP_(n)) is the distortion increment when the quantisation parameter increases from QP_(n−1) to QP_(n).

Thereafter a histogram or list Hist^(1→0)[QP_(n)] based on DCT coefficient magnitudes and related QP is established for the current GOB (group of macroblocks). This histogram represents the number of DCT coefficients which are quantised to amplitude amount ‘1 ’ when applying QP_(n), but will be quantised to amplitude ‘0 ’ when applying the following quantisation parameter QP_(n+1)

Based on the above histogram or list Hist^(1→0)[QP_(n)], for H.264/AVC one can easily establish the look-up table of the number of non-zero magnitude coefficients under each quantisation parameter by formula

${{{NZC}\left\lbrack {QP}_{n} \right\rbrack} = {N_{coeff} - {\sum\limits_{i = 0}^{n - 1}{{Hist}^{1->0}\left\lbrack {QP}_{i} \right\rbrack}}}},{0 \leq n \leq 51},$

wherein N_(Coeff) is the total number of coefficients in each unit (which is GOB in this invention).

To each quantisation parameter QP_(n) belongs a corresponding quantisation step QPS_(n) that can be derived from a corresponding look-up table e.g. in the H.264/AVC standard.

In order to estimate the distortion increment ΔD(QP_(n−1), QP_(n)) between two successive QP values accurately, three cases are considered:

-   -   Case 1) the quantised coefficient is not zero at QP_(n);     -   Case 2) the quantised coefficient is not zero at QP_(n−1) but it         is quantised to zero at QP_(n);     -   Case 3) the quantised coefficient is zero at QP_(n−1).

For Case 1) the distortion increment can be estimated using the following formula, based on the assumption that the residual signal is uniformly distributed inside the quantisation level gap:

$\begin{matrix} \begin{matrix} {{{UD}\left( {QP}_{n} \right)} = {\frac{1}{{QPS}_{n}}{\int_{{k^{*}{QPS}_{n}} - \delta_{n}}^{{{({k + 1})}^{*}{QPS}_{n}} - \delta_{n}}{\left( {x - {k^{*}{QPS}_{n}}} \right)^{2}{x}}}}} \\ {= {\left( {{QPS}_{n}^{2} - {3\delta_{n}{QPS}_{n}} + {3\delta_{n}^{2}}} \right)/3}} \end{matrix} & \; \\ {{\Delta \; {E_{1}\left( {QP}_{n} \right)}} = {\left\{ {{{UD}\left( {QP}_{n} \right)} - {{UD}\left( {QP}_{n - 1} \right)}} \right\} \times \frac{{NZC}\left\lbrack {QP}_{n} \right\rbrack}{N_{Coeff}}}} & \; \end{matrix}$

where UD(QP_(n)) is the distortion introduced by QP_(n) in Case 1) where the assumption of uniform distribution exists, and ΔE₁(QP_(n)) represents the distortion increase from QP_(n−1) to QP_(n) in Case 1).

For Case 2) the distortion increment can be estimated using the following formula:

$\begin{matrix} {{\Delta \; {E_{2}\left( {QP}_{n} \right)}} = {\begin{Bmatrix} {{\frac{1}{\begin{matrix} {\left( {{QPS}_{n} - \delta_{n}} \right) -} \\ \left( {{QPS}_{n - 1} - \delta_{n - 1}} \right) \end{matrix}} \times {\int_{{QPS}_{n - 1} - \delta_{n - 1}}^{{QPS}_{n} - \delta_{n}}{x^{2}{x}}}} -} \\ {{UD}\left( {QP}_{n - 1} \right)} \end{Bmatrix} \times}} \\ {\frac{{Hist}^{1->0}\left\lbrack {QP}_{n} \right\rbrack}{N_{{coeff}\;}}} \\ {= {{\begin{Bmatrix} {\left( {{QPS}_{n} - \delta_{n}} \right)^{2} + {\left( {{QPS}_{n} - \delta_{n\;}} \right) \cdot}} \\ {\left( {{QPS}_{n - 1} - \delta_{n - 1}} \right) + {{QPS}_{n - 1} \cdot \delta_{n - 1}} - {2\delta_{n - 1}^{2}}} \end{Bmatrix}/3} \times}} \\ {\frac{{Hist}^{1->0}\left\lbrack {QP}_{n} \right\rbrack}{N_{Coeff}}} \end{matrix}$

For Case 3) there is no distortion increment.

In H.264/AVC, δ_(n) is

$\frac{2 \times {QPS}_{n}}{3}$

in case of DC transform used in the intra16×16 mode and

$\delta_{n} = \frac{{QPS}_{n}}{3}$

is used in other cases of intra coding, and

$\frac{{QPS}_{n}}{6}$

is used in case of inter coding. Then the final distortion increment is

ΔD ^(e)(QP_(n−1),QP_(n))=ΔE₁(QP_(n))+ΔE₂(QP_(n)).

The initial value of the iterative distortion estimation method is

${D^{e}\left( {QP}_{0} \right)} = {{{{UD}\left( {QP}_{0} \right)} \times \frac{{NZC}\left\lbrack {QP}_{0} \right\rbrack}{N_{Coeff}}} + {\frac{1}{{QPS}_{0} - \delta_{0}} \times {\int_{0}^{{QPS}_{0} - \delta_{0}}{x^{2}{x} \times {\frac{N_{Coeff} - {{NZC}\left\lbrack {QP}_{0} \right\rbrack}}{N_{Coeff}\;}.}}}}}$

Then the QP-Distortion table D_(GOB) _(i) [QP_(n)] can be established.

Because, as is known from the above Z. He and S. K. Mitra article, the number of non-zero amplitude coefficients is proportional to the number of coded bits, the liner model can fit very well. Therefore a linear model is used to estimate the bit rate based on the established list NZC.

Assuming that the number of coded bits will be zero when the number of non-zero coefficients is zero, a corresponding interpolation line can be fixed if at least two points on the line are given. One reference point QP is set to QP_(ref), then the real number of coded bits R_(bits) is determined by entropy coding or by estimating it through frequency analysis (e.g. according to Q. Chen, Y. He, “A Fast Bits Estimation Method for Rate-Distortion Optimisation in H.264/AVC”, Picture Coding Symposium, 15-17 Dec. 2004, San Francisco, Calif., USA) according to different complexity and accuracy requirements. Combining this linear model and the look-up table NZC[QP_(n)], the QP-Rate table of R_(GOB) _(i) [QP_(n)] can be constructed by the following formula:

$\frac{R_{bist}^{e}\left\lbrack {QP}_{n} \right\rbrack}{{NZC}\left\lbrack {QP}_{n} \right\rbrack} = \frac{R_{bits}}{{NZC}\left\lbrack {QP}_{ref} \right\rbrack}$

Then based on non-zero list or table NZC[QP_(n)], one can easily get the QP-ρ Table ρ_(GOB) _(i) [QP_(n)] using the following formula:

${\rho \left\lbrack {QP}_{n} \right\rbrack} = {1 - \frac{{NZC}\left\lbrack {QP}_{n} \right\rbrack}{N_{Coeff}}}$

Step 2) Distortion Allocation

Based on the assumption of Gaussian distribution of the residual signals, a simplified rate-distortion model as equation (8) has been used in optimum bit allocation. Based on equations (8) and (10), one basic conclusion can be arrived:

$\begin{matrix} {{\overset{N}{\prod\limits_{i = 1}}D_{i}} = {{\prod\limits_{i = 1}^{N}{\sigma_{i}^{2} \times ^{{- \gamma}\; {\sum\limits_{i = 1}^{N}R_{i}}}}} = {\prod\limits_{i = 1}^{N}{\sigma_{i}^{2} \times ^{{- \gamma}\; R_{f}}}}}} & (14) \end{matrix}$

Therefore the multiplication result of the distortion of each GOB should keep constant with a given bit budget R_(f). As described in Step 2.1), the D_(i) of each GOB_(i) in the CBR case can be easily derived by looking up tables D_(GOB) _(i) [QP_(n)] and R_(GOB) _(i) [QP_(n)] and then based on equations (14) and (9):

$\begin{matrix} {{{\prod\limits_{i = 1}^{N}{\overset{\overset{\_}{\_}}{D}}_{i}} = {{\prod\limits_{i = 1}^{N}{\sigma_{i}^{2} \times ^{{- \gamma}\; R_{f}}}} = {{\prod\limits_{i = 1}^{N}{\overset{\_}{D}}_{i\;}} = {\left( D_{u} \right)^{N} \times {\prod\limits_{i = 1}^{N}M_{i}}}}}}{With}{{D_{T} = {\sum\limits_{i = 1}^{N}{\log_{2}{\overset{\overset{\_}{\_}}{D}}_{i}}}},}} & (15) \end{matrix}$

equation (11) can be derived from equation (15).

Since equation (8) is not always accurate enough due to content property differences inside a picture and the quantisation level being limited by a discrete finite set of values, some minor modification can be done based on a feedback from Step 3) to reach the bit budget. The result from equation (11) should always be a good starting point for searching an optimised distortion allocation using the look-up tables.

Step 3) Rate Allocation

The result of this step is fed back to Step 2.3) in order to refine the bit allocation.

Step 4) Bit Allocation Inside Each GOB_(i)

This step is used to accurately meet the bit budget constraint. Usually, if the bit budget is already met in Step 3), the corresponding quantisation parameter derived from the look-up table R_(GOB) _(i) [QP_(n)] can be used directly for each GOB. However, an accurate bit allocation with updating is still required to meet the bit budget in case the quantisation parameter and the coding mode in the real coding are different from that in the pre-analysis process (e.g. in H.264/AVC). Therefore the rho-domain rate control is used as a refined bit allocation scheme inside each GOB to distribute the distortion with a limited bit budget.

Instead of being frame based, the invention can also be carried out in a field based manner for interlaced video signals.

The invention can also be used in multi-pass rate control video coding and in error resilience video coding. 

1-9. (canceled)
 10. A method for determining in picture signal encoding, which includes transform and quantization of transform coefficient blocks, the bit allocation for groups of pixel blocks in a picture, whereby said picture is divided into a regular grid of pixel blocks and said groups of pixel blocks belong to different attention importance levels of corresponding arbitrary-shaped areas of pixel blocks in said picture, and wherein the encoding/decoding distortion of each group of pixel blocks is to be controlled such that it is basically proportional to the attention importance level for that group of pixel blocks, and wherein a bit budget is given for the encoded picture and said quantization is controlled by a quantization parameter, comprising steps of: for the current picture, with respect to candidates of said quantization parameter, establishing for each group of pixel blocks tables or lists or functions for the estimated distortion and for the bit rate and for the number of zero-amplitude coefficients following said quantization; calculating for each one of said groups of pixel blocks the corresponding distortion distribution, using said tables or lists or functions for the estimated distortion and for the bit rate and, using also the output from the following step, modifying said distortion distribution in order to reach said bit budget; based on said tables or lists or functions for the estimated distortion and for the bit rate, and based on said calculated distortion distribution, calculating an estimated bit rate for each one of said groups of pixel blocks; performing a rho-domain bit allocation for each one of said groups of pixel blocks using said estimated bit rate and said table or list or function for the number of zero-amplitude coefficients, to determine the corresponding one of said quantization parameters for quantizing and encoding the pixel blocks.
 11. Method according to claim 10, wherein said pixel blocks are macroblocks.
 12. Method according to claim 10, wherein said encoded picture is part of an ISO/IEC 14496-10 AVC encoded picture sequence.
 13. Method according to claim 10, wherein said quantization parameter is a quantiser step size.
 14. Method according to claim 10, wherein the step or function of calculating for each one of said groups of pixel blocks the corresponding distortion distribution comprises: without regarding different distortion levels in the different attention level areas, calculating a corresponding initial distortion value D_(i) for each group of pixel blocks; calculating a distortion unit ${D_{u} = ^{{({{\sum\limits_{i = 1}^{N}{l\; n{\overset{\overset{\_}{\_}}{D}}_{i}}} - {\sum\limits_{i = 1}^{N}{l\; n\; M_{i}}} - {\sum\limits_{i = 1}^{N}{l\; {nK}_{i}}}})}/N}},$ wherein M_(i) is the attention importance level for a corresponding group of pixel blocks and K_(i) is the number of pixel blocks in the corresponding group of pixel blocks and N is the number of attention levels; calculating from said D_(u) value a refined distortion distribution by D_(i) =D_(u)×M_(i) for each one of said groups of pixel blocks, whereby said modifying of said distortion distribution D_(i) is performed here.
 15. Method according to claim 10, wherein the step or function of performing a rho-domain bit allocation for each one of said groups of pixel blocks comprises: calculating ${\rho = {{384*\left( {K_{i} - N_{i}^{c}} \right)} - \frac{{\overset{\_}{R}}_{i} - R_{i}^{c}}{\theta}}},$ wherein N_(i) ^(c) is the number of the coded pixel blocks of the current group of pixel blocks, R_(i) ^(c) is the number of bits used to encode these N_(i) ^(c) pixel blocks, and K_(i) is the total number of the pixel blocks of the current groups of pixel blocks; determining from said table or list or function for the number of zero-amplitude coefficients following said quantization the corresponding quantization parameter; updating said table or list or function for the number of zero-amplitude coefficients, and parameter θ by $\theta = \frac{R_{i}^{c}}{{384*N_{i}^{c}} - \rho_{i}^{c}}$ according to the already encoded pixel blocks, wherein σ_(i) ^(c) is the number of quantized zero coefficients in these coded N_(i) ^(c) pixel blocks.
 16. An apparatus for determining in picture signal encoding, which includes transform and quantization of transform coefficient blocks, the bit allocation for groups of pixel blocks in a picture, whereby said picture is divided into a regular grid of pixel blocks and said groups of pixel blocks belong to different attention importance levels of corresponding arbitrary-shaped areas of pixel blocks in said picture, and wherein the encoding/decoding distortion of each group of pixel blocks is to be controlled such that it is basically proportional to the attention importance level for that group of pixel blocks, and wherein a bit budget is given for the encoded picture and said quantization is controlled by a quantization parameter, said apparatus comprising: means being adapted for establishing, for the current picture, with respect to candidates of said quantization parameter, for each group of pixel blocks tables or lists or functions for the estimated distortion and for the bit rate and for the number of zero-amplitude coefficients following said quantization; means being adapted for calculating for each one of said groups of pixel blocks the corresponding distortion distribution, using said tables or lists or functions for the estimated distortion and for the bit rate and, using also the output from the following step, modifying said distortion distribution in order to reach said bit budget; means being adapted for calculating, based on said tables or lists or functions for the estimated distortion and for the bit rate, and based on said calculated distortion distribution, an estimated bit rate for each one of said groups of pixel blocks; means being adapted for performing a rho-domain bit allocation for each one of said groups of pixel blocks using said estimated bit rate and said table or list or function for the number of zero-amplitude coefficients, to determine the corresponding one of said quantization parameters for quantizing and encoding the pixel blocks.
 17. Apparatus according to claim 16, wherein said pixel blocks are macroblocks.
 18. Apparatus according to claim 16, wherein said encoded picture is part of an ISO/IEC 14496-10 AVC encoded picture sequence.
 19. Apparatus according to claim 16, wherein said quantization parameter is a quantiser step size.
 20. Apparatus according to claim 16, wherein the means being adapted for calculating for each one of said groups of pixel blocks the corresponding distortion distribution comprises: means for calculating, without regarding different distortion levels in the different attention level areas, a corresponding initial distortion value D_(i) for each group of pixel blocks; means for calculating a distortion unit ${D_{u} = ^{{({{\sum\limits_{i = 1}^{N}{l\; n{\overset{\overset{\_}{\_}}{D}}_{i}}} - {\sum\limits_{i = 1}^{N}{l\; {nM}_{i}}} - {\sum\limits_{i = 1}^{N}{l\; {nM}_{i}}}})}/N}},$ wherein M_(i) is the attention importance level for a corresponding group of pixel blocks and K_(i) is the number of pixel blocks in the corresponding group of pixel blocks and N is the number of attention levels; means for calculating from said D_(u) value a refined distortion distribution by D_(i) =D_(u)×M_(i) for each one of said groups of pixel blocks, whereby said modifying of said distortion distribution D_(i) is performed here.
 21. Apparatus according to claim 16, wherein the means being adapted for performing a rho-domain bit allocation for each one of said groups of pixel blocks comprises: means for calculating ${\rho = {{384*\left( {K_{i} - N_{i}^{c}} \right)} - \frac{{\overset{\_}{R}}_{i} - R_{i}^{c}}{\theta}}},$ wherein N_(i) ^(c) is the number of the coded pixel blocks of the current group of pixel blocks, R_(i) ^(c) is the number of bits used to encode these N_(i) ^(c) pixel blocks, and K_(i) is the total number of the pixel blocks of the current groups of pixel blocks; means for determining from said table or list or function for the number of zero-amplitude coefficients following said quantization the corresponding quantization parameter; means for updating said table or list or function for the number of zero-amplitude coefficients, and parameter θ by $\theta = \frac{R_{i}^{c}}{{384*N_{i}^{c}} - \rho_{i}^{c}}$ according to the already encoded pixel blocks, wherein ρ_(i) ^(c) is the number of quantized zero coefficients in these coded N_(i) ^(c) pixel blocks.
 22. A digital video signal that is encoded using the method of claim
 10. 23. Storage medium, for example on optical disc, that contains or stores, or has recorded on it, a digital video signal encoded according to the method of claim
 10. 